using System;
using System.ComponentModel;
using System.Linq;

using Newtonsoft.Json;
using Newtonsoft.Json.Linq;

namespace ApiTest.Entitys
{
    /// <summary>
    /// 商品规格
    /// </summary>  
    /// <remarks>
    /// <![CDATA[ENGINE=InnoDB  COMMENT='商品规格']]>
    /// </remarks>
    [DbSource("Default"), Serializable]
    public class GoodsSku
    {
        /// <summary>
        /// sku_id
        /// </summary>
        /// <remarks>
        /// <![CDATA[varchar(32) NOT NULL COMMENT '']]>
        /// </remarks>
        [Primary(32)]
        public string SkuId { get; set; }

        /// <summary>
        /// 供应商id
        /// </summary>
        /// <remarks>
        /// <![CDATA[int NOT NULL COMMENT '供应商id']]>
        /// </remarks>
        [Column(false)]
        [DisplayName("供应商id")]
        public int SupplierId { get; set; }

        /// <summary>
        /// goods_id
        /// </summary>
        /// <remarks>
        /// <![CDATA[bigint NOT NULL COMMENT '']]>
        /// </remarks>
        [Column(false)]
        public long GoodsId { get; set; }

        /// <summary>
        /// 规格名称
        /// </summary>
        /// <remarks>
        /// <![CDATA[varchar(255) DEFAULT NULL COMMENT '规格名称']]>
        /// </remarks>
        [Column(255)]
        [DisplayName("规格名称")]
        public string SkuName { get; set; }

        /// <summary>
        /// SKU编码
        /// </summary>
        /// <remarks>
        /// <![CDATA[varchar(64) DEFAULT NULL COMMENT 'SKU编码']]>
        /// </remarks>
        [Column(64)]
        [DisplayName("SKU编码")]
        public string SkuCode { get; set; }

        /// <summary>
        /// 条形码
        /// </summary>
        /// <remarks>
        /// <![CDATA[varchar(64) DEFAULT NULL COMMENT '条形码']]>
        /// </remarks>
        [Column(64)]
        [DisplayName("条形码")]
        public string BarCode { get; set; }

        /// <summary>
        /// 供应价格
        /// </summary>
        /// <remarks>
        /// <![CDATA[decimal(10,2) NOT NULL COMMENT '供应价格']]>
        /// </remarks>
        [Column(10, false, Digit = 2)]
        [DisplayName("供应价格")]
        public decimal SupplyPrice { get; set; }

        /// <summary>
        /// 建议零售价
        /// </summary>
        /// <remarks>
        /// <![CDATA[decimal(10,2) NOT NULL COMMENT '建议零售价']]>
        /// </remarks>
        [Column(10, false, Digit = 2)]
        [DisplayName("建议零售价")]
        public decimal MsrPrice { get; set; }

        /// <summary>
        /// 库存
        /// </summary>
        /// <remarks>
        /// <![CDATA[int NOT NULL COMMENT '库存']]>
        /// </remarks>
        [Column(false)]
        [DisplayName("库存")]
        public int Stock { get; set; }

        /// <summary>
        /// 删除
        /// </summary>
        /// <remarks>
        /// <![CDATA[bit(1) NOT NULL COMMENT '删除']]>
        /// </remarks>
        [Column(1, false)]
        [DisplayName("删除")]
        public bool IsDel { get; set; }

        /// <summary>
        /// 序列
        /// </summary>
        /// <remarks>
        /// <![CDATA[int NOT NULL COMMENT '序列']]>
        /// </remarks>
        [Column(false)]
        [DisplayName("序列")]
        public int Sort { get; set; }

    }
}
